import React, { CSSProperties, forwardRef } from "react";

interface Props {
    iconName: string
    style?: CSSProperties,

}

const SymbolIcon = (props: Props, ref: any) => {
    const {
        iconName,
        style
    } = props;

    return (
        <svg 
            // className="symbol-icon" 
            // aria-hidden="true"
            style={style ? style : {}}
            color="#ff0000"
        >
            <use xlinkHref={`#${iconName}`}></use>
        </svg>
    )
}

export default forwardRef(SymbolIcon);